package com.zl.singleton;

/**
 * @author zengle
 * @create 2021-07-01 15:29
 */
public class Singleton6 {
    private static final ThreadLocal<Singleton6> SINGLETON_6_THREAD_LOCAL =
            new ThreadLocal<Singleton6>() {
                @Override
                protected Singleton6 initialValue() {
                    return new Singleton6();
                }
            };

    private Singleton6() {
    }

    public static Singleton6 getInstance() {
        return SINGLETON_6_THREAD_LOCAL.get();
    }
}
